/**
 * 
 */
package cn.softTank.BpelModelImpl;

import org.dom4j.DocumentHelper;
import org.dom4j.Element;

import cn.softTank.BpelModel.Import;

/**
 * @author Yuzone (smartzxy@gmail.com)
 *
 */
public class ImportImpl implements Import {

	private String importType;
	private String location;
	private String namespace;
	
	/* (non-Javadoc)
	 * @see cn.softTank.BpelModel.Import#getImportType()
	 */
	@Override
	public String getImportType() {
		return this.importType;
	}

	/* (non-Javadoc)
	 * @see cn.softTank.BpelModel.Import#getLocation()
	 */
	@Override
	public String getLocation() {
		return this.location;
	}

	/* (non-Javadoc)
	 * @see cn.softTank.BpelModel.Import#getNamespace()
	 */
	@Override
	public String getNamespace() {
		return this.namespace;
	}

	/* (non-Javadoc)
	 * @see cn.softTank.BpelModel.Import#setImportType(java.lang.String)
	 */
	@Override
	public void setImportType(String value) {
		this.importType=value;
	}

	/* (non-Javadoc)
	 * @see cn.softTank.BpelModel.Import#setLocation(java.lang.String)
	 */
	@Override
	public void setLocation(String value) {
		this.location=value;
	}

	/* (non-Javadoc)
	 * @see cn.softTank.BpelModel.Import#setNamespace(java.lang.String)
	 */
	@Override
	public void setNamespace(String value) {
		this.namespace=value;
	}

	/* (non-Javadoc)
	 * @see cn.softTank.BpelModel.XmlAdapt#toElement()
	 */
	@Override
	public Element toElement() {
		Element e=DocumentHelper.createElement("import");
		if(namespace!=null)
			e.addAttribute("namespace", namespace);
		if(location!=null)
			e.addAttribute("location", location);
		if(importType!=null)
			e.addAttribute("importType", importType);
		return e;
	}

	/* (non-Javadoc)
	 * @see cn.softTank.BpelModel.XmlAdapt#toXml()
	 */
	@Override
	public String toXml() {
		// TODO Auto-generated method stub
		return null;
	}

}
